﻿using Direct.IDAL.Manager.Notice;
using DirectSell.Common.Filter;
using DirectSell.Model.ManagerNotice;
using Microsoft.Practices.Unity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace DirectSell.WebLayer.Areas.Manager.Controllers
{
  

    /// <summary>
    /// 发布公告
    /// </summary>
    public class NoticeAddController : Controller
    {
        [Dependency]
        protected INoticeManagerRepository _repository { get; set; }

        #region 首页
        [ManagerFilter(IsCheck = true)]
        public ActionResult Index()
        {
            return View();
        }
        #endregion

        #region 添加公告
        [HttpPost]
        [ValidateInput(false)]
        public JsonResult Add(NoticeReq req)
        {
            var result = _repository.NoticeAdd(req);
            return Json(result);
        }
        #endregion



    }
}